{% import 'macros.html' as util %}
<!DOCTYPE html>
<html lang=en>
  <head>
    {% block head %}
    <title>Logbook - {% block title%}{% endblock %}</title>
    <script src="js/jquery-2.0.3.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.signaturepad.min.js"></script>
    <script src="js/json2.min.js"></script>
    <script src="js/holder.js"></script>
    <script src="js/util.js"></script>
    <link href="css/jquery.signaturepad.css" rel="stylesheet" media="screen">
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="css/bootstrap-glyphicons.css" rel="stylesheet" media="screen">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {% endblock %}
    {% block scripts %}
    {% endblock %}
  </head>
  <body>
    <div class="navbar navbar-static-top navbar-inverse">
      <div class="container">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/">Logbook</a>
        <ul class="nav navbar-nav">
          <li id="nav-flights"><a href="/flights">Flights</a></li>
          <li id="nav-flight" class="hide"><a href="#">Flight</a></li>
          <li id="nav-pilot"><a href="/pilot">Pilot</a></li>
          <li id="nav-aircraft"><a href="/aircraft">Aircraft</a></li>
          <li id="nav-airports"><a href="/airports">Airports</a></li>
        </ul>
        <div class="nav-collapse collapse navbar-responsive-collapse">
          {% if search_uri != None %}
          <form class="navbar-form pull-left" method="GET" action="/{{ search_uri }}">
            <input type="search" class="form-control" placeholder="Search" name="q" style="width: 200px;">
          </form>
          {% endif %}
          <ul class="nav navbar-nav pull-right">
            {% if pilot is defined %}
            <li><a href="/pilot">{{ pilot.name or pilot.user.email() }}</a></li>
            {% endif %}
            <li><a class="btn btn-default" href="{{ login_url }}">{{ login_text }}</a></li>
          </ul>
        </div><!-- .navbar-collapse -->
      </div><!-- .container -->
    </div><!-- .navbar -->
    {% block body %}
    {% endblock body %}
  </body>
</html>
